home *** CD-ROM | disk | FTP | other *** search
/ Interactive Web Graphics with Shout 3D / Interactive Web Graphics With Shout 3D.iso / pc / Shout3Ddemo / Shout3d_runtime / codebase / models / textureManipulation / gradientAndTintedMultiAppearanc < prev    next >
Text File  |  2000-07-13  |  3KB  |  147 lines

  1. #VRML V2.0 utf8
  2. DirectionalLight {
  3.     direction 0 0 -1
  4.     intensity 0.5
  5. }
  6. DEF LIGHT DirectionalLight {
  7.     direction 1 -1 -1 
  8.     intensity 1
  9. }
  10. Transform {
  11.     translation -5 0 0
  12.     children Shape {
  13.         appearance MultiAppearance { 
  14.             material Material { diffuseColor 1 1 1 } 
  15.             diffuseMap DiffuseMap {
  16.                 texture  DEF TINTED_TEX TintedImageTexture {
  17.                     url "../images/shared/squareTile.gif"
  18.                     tintColor 1 1 1
  19.                 }
  20.             }
  21.         }
  22.         geometry Sphere {}
  23.     }
  24. }
  25. Transform {
  26.     translation 0 0 0
  27.     children Shape {
  28.         appearance MultiAppearance { 
  29.             material Material { diffuseColor 1 1 1 specularColor 0 1 0 shininess 0.1 } 
  30.             opacityLevelMap OpacityLevelMap  {
  31.                 texture  USE TINTED_TEX
  32.             }
  33.         }
  34.         geometry Sphere {}
  35.     }
  36. }
  37. Transform {
  38.     translation 5 0 0
  39.     children Shape {
  40.         appearance MultiAppearance { 
  41.             material Material { diffuseColor 1 1 1  specularColor 1 0 1 shininess 0.1 } 
  42.             specularLevelMap SpecularLevelMap  {
  43.                 texture  USE TINTED_TEX
  44.             }
  45.         }
  46.         geometry Sphere {}
  47.     }
  48. }
  49. Transform {
  50.     translation -5 -5 0
  51.     children Shape {
  52.         appearance MultiAppearance { 
  53.             material Material { diffuseColor 1 1 1 } 
  54.             diffuseMap DiffuseMap {
  55.                 texture  DEF GRADIENT_TEX GradientTexture {
  56.                     width 2
  57.                     gradientColors [ 1 0 0, .8 .3 .1, 1 1 0, 0 1 0, 0 0 1, 1 0 1]
  58.                 }
  59.             }
  60.         }
  61.         geometry Sphere {}
  62.     }
  63. }
  64. Transform {
  65.     translation 0 -5 0
  66.     children Shape {
  67.         appearance MultiAppearance { 
  68.             material Material { diffuseColor 1 1 1 specularColor 0 1 0 shininess 0.1 } 
  69.             opacityLevelMap OpacityLevelMap  {
  70.                 texture  USE GRADIENT_TEX
  71.             }
  72.         }
  73.         geometry Sphere {}
  74.     }
  75. }
  76. Transform {
  77.     translation 5 -5 0
  78.     children Shape {
  79.         appearance MultiAppearance { 
  80.             material Material { diffuseColor 1 1 1  specularColor 1 0 1 shininess 0.1 } 
  81.             specularLevelMap SpecularLevelMap  {
  82.                 texture  USE GRADIENT_TEX
  83.             }
  84.         }
  85.         geometry Sphere {}
  86.     }
  87. }
  88. DEF TIME_SENSOR TimeSensor {
  89.     loop TRUE
  90.     cycleInterval 5
  91. }
  92. DEF LIGHT_DIR_INTERP ColorInterpolator {
  93.     key [ 0 .25 .5 .75 1 ]
  94.     keyValue [    
  95.     1 -1 0,
  96.     0 -1 1,
  97.     -1 -1 0,
  98.     0 -1 -1,
  99.     1 -1 0,
  100.     ]
  101.     
  102. }
  103. ROUTE TIME_SENSOR.fraction TO LIGHT_DIR_INTERP.fraction
  104. ROUTE LIGHT_DIR_INTERP.value TO LIGHT.direction
  105.  
  106. DEF TINT_INTERP ColorInterpolator {
  107.     key [ 0 .1 .2 .3 .4 .5 .6 .7 .8 .9 1 ]
  108.     keyValue [    
  109.     1 1 1,
  110.     
  111.     0 0 0,
  112.     0 0 0,
  113.     
  114.     1 1 0,
  115.     1 1 0,
  116.  
  117.     .5 .5 .5,
  118.     .5 .5 .5,
  119.     
  120.     1 0 0,
  121.     1 0 0,
  122.     
  123.     1 1 1,
  124.     1 1 1,
  125.     ]
  126.     
  127. }
  128. ROUTE TIME_SENSOR.fraction TO TINT_INTERP.fraction
  129. ROUTE TINT_INTERP.value TO TINTED_TEX.tintColor
  130. DEF GRADIENT_INTERP CoordinateInterpolator {
  131.     key [ 0 .1 .35 .45 .7 .75 1 ]
  132.     keyValue [    
  133.     1 0 0, .8 .3 .1, 1 1 0, 0 1 0, 0 0 1, 1 0 1,
  134.  
  135.     0 0 0, 0 0 0, 1 1 1, 1 1 1, 0 0 0, 0 0 0,
  136.     0 0 0, 0 0 0, 1 1 1, 1 1 1, 0 0 0, 0 0 0,
  137.  
  138.     1 1 1, 1 1 1, .1 .1 .1, .1 .1 .1, 1 1 1, 1 1 1,
  139.     1 1 1, 1 1 1, .1 .1 .1, .1 .1 .1, 1 1 1, 1 1 1,
  140.  
  141.     1 0 0, .8 .3 .1, 1 1 0, 0 1 0, 0 0 1, 1 0 1
  142.     1 0 0, .8 .3 .1, 1 1 0, 0 1 0, 0 0 1, 1 0 1
  143.     ]
  144.     
  145. }
  146. ROUTE TIME_SENSOR.fraction TO GRADIENT_INTERP.fraction
  147. ROUTE GRADIENT_INTERP.value TO GRADIENT_TEX.gradientColors